    <?php
		$form = $this->beginWidget ( 'CActiveForm', array (
				'id' => 'attachment-form',
				'enableAjaxValidation' => false,
				'enableClientValidation' => true,
				'clientOptions' => array (
						'validateOnSubmit' => true,
						'validateOnType' => true 
				),
				'htmlOptions' => array (
						'enctype' => 'multipart/form-data' 
				) 
		) );
	?>

    <table class="form" style="width: 100%">
		<tr>
			<td class="label required"><?php echo $form->labelEx($model, 'name'); ?></td>
			<td class="input">
				<?php echo $form->textField($model, 'name', array('style' => 'width:210px', 'placeholder' => t('LBL_NAME', 'attachment'))); ?>
				<?php echo $form->error($model, 'name'); ?>
			</td>
		</tr>
		<tr>
			<td class="label required"><?php echo $form->labelEx($model, 'file_name'); ?></td>
			<td class="input">
				<?php echo $form->fileField($model, 'file_name', array('style' => 'width:224px',)); ?>
				<?php echo $form->error($model, 'file_name'); ?>
				<?php echo '<br />' . substr($model->file_name, strpos($model->file_name, '_') + 1); ?>
				<div style="font-size: 13px;">
					<b>Note</b> </br> 1. Kiểu tệp tin được chấp nhận :
					{"jpg","jpeg","bmp","png","gif", "doc", "docx", "xls", "xlsx", "pdf", "mp3", "mp4"} </br> 
					2. Dung lượng tệp tin không được vượt quá 5MB. 
				</div>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="cbutton">
				<?php echo Html::buttonConfirm(t('BTN_SAVE'), 'btnSave', 'ok', array('type' => 'submit', 'class' => 'button save update-file-dialog-submit-button'))?>
				<?php echo Html::buttonConfirm(t('BTN_CANCEL'), 'photoCanceled', 'cancel'); ?>
            </td>
		</tr>
	</table>    
    <?php $this->endWidget(); ?>
    <script type="text/javascript">
	LGCMS.addTooltip();
    </script>
